﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Commonlib;
namespace AlbonWeb
{
    public partial class Top : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                bindBulletin();
            }
        }

        private void bindBulletin()
        {
            string cmdstr ="select top 3 * from BulletinMessage where active=1 order by createDate desc";
            SqlHelper.BindRepeater(repBulletin,SqlHelper.SqlConnectionString,CommandType.Text,cmdstr,null);
        }

        protected void exit_btn_Click(object sender, EventArgs e)
        {
            BLL.UserBLL userbll = new BLL.UserBLL();
            userbll.Logout();
            JavaScriptHelper.RefreshParent("/Default.aspx");
        }
    }
}